FROM php:7.3-fpm
MAINTAINER ZHANG LI BIN <838159198@qq.com>

COPY sources.list   /etc/apt/sources.list
COPY buster.list   /etc/apt/sources.list.d/

# Install modules
RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libpng-dev \
		libpq-dev \
		libmcrypt-dev \
	&& docker-php-ext-install -j$(nproc) pdo_mysql \
	&& docker-php-ext-install -j$(nproc) pdo_pgsql \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd


# deprecated
#RUN pecl install mcrypt-1.0.2 \
 #   && docker-php-ext-enable mcrypt


RUN pecl install redis \
    && docker-php-ext-enable redis


# Install tools
RUN apt-get update && \
    apt-get install -y pngquant --no-install-recommends && \
    rm -rf /var/lib/apt/lists/* 

CMD ["php-fpm"]

